package cn.codesugar.service

import android.app.IntentService
import android.content.Intent
import android.util.Log

private const val TAG = "MyIntentService"

class MyIntentService : IntentService("MyIntentService") {

    override fun onHandleIntent(intent: Intent?) {
        // 打印当前线程的id
        Log.e(TAG, "onHandleIntent() executed, Thread id is ${Thread.currentThread().name}")
    }

    override fun onDestroy() {
        super.onDestroy()
        Log.e(TAG, "onDestroy executed")
    }

}